package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TKsRecordDetail;
import com.party.business.mapper.TKsRecordDetailMapper;
import com.party.business.service.ITKsRecordDetailService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 答题详情Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-15
 */
@Service
public class TKsRecordDetailServiceImpl extends ServiceImpl<TKsRecordDetailMapper, TKsRecordDetail>  implements ITKsRecordDetailService
{
    @Autowired
    private TKsRecordDetailMapper tKsRecordDetailMapper;

    /**
     * 查询答题详情
     *
     * @param id 答题详情主键
     * @return 答题详情
     */
    @Override
    public TKsRecordDetail selectTKsRecordDetailById(String id)
    {
        return tKsRecordDetailMapper.selectTKsRecordDetailById(id);
    }

    /**
     * 查询答题详情列表
     *
     * @param tKsRecordDetail 答题详情
     * @return 答题详情
     */
    @Override
    public List<TKsRecordDetail> selectTKsRecordDetailList(TKsRecordDetail tKsRecordDetail)
    {
        return tKsRecordDetailMapper.selectTKsRecordDetailList(tKsRecordDetail);
    }

    /**
     * 新增答题详情
     *
     * @param tKsRecordDetail 答题详情
     * @return 结果
     */
    @Override
    public int insertTKsRecordDetail(TKsRecordDetail tKsRecordDetail)
    {
                tKsRecordDetail.setCreateTime(DateUtils.getNowDate());
            return tKsRecordDetailMapper.insertTKsRecordDetail(tKsRecordDetail);
    }

    /**
     * 修改答题详情
     *
     * @param tKsRecordDetail 答题详情
     * @return 结果
     */
    @Override
    public int updateTKsRecordDetail(TKsRecordDetail tKsRecordDetail)
    {
                tKsRecordDetail.setUpdateTime(DateUtils.getNowDate());
        return tKsRecordDetailMapper.updateTKsRecordDetail(tKsRecordDetail);
    }

    /**
     * 批量删除答题详情
     *
     * @param ids 需要删除的答题详情主键
     * @return 结果
     */
    @Override
    public int deleteTKsRecordDetailByIds(String[] ids)
    {
        return tKsRecordDetailMapper.deleteTKsRecordDetailByIds(ids);
    }

    /**
     * 删除答题详情信息
     *
     * @param id 答题详情主键
     * @return 结果
     */
    @Override
    public int deleteTKsRecordDetailById(String id)
    {
        return tKsRecordDetailMapper.deleteTKsRecordDetailById(id);
    }
}
